package me.raih.service.impl;

import me.raih.mapper.CategoryMapper;
import me.raih.pojo.po.Category;
import me.raih.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author Raih
 * @Time 2020/12/6  14:00
 */
@Service
@Transactional
public class CategoryServiceImpl implements CategoryService {

    @Autowired
    CategoryMapper categoryMapper;

    @Override
    public List<Category> findCategory() {

        List<Category> category = categoryMapper.findCategory();
        return category;
    }

    @Override
    public Category findCategoryByNo(int no) {

        Category category = categoryMapper.findCategoryByNo(no);

        return category;
    }
}
